]> dgit.raspbian.org Git - gnome-shell.git/commit
shellDBus: Use MetaContext:unsafe-mode to restrict Eval()
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 16 Jun 2021 23:50:50 +0000 (01:50 +0200)
committerMarge Bot <marge-bot@gnome.org>
Fri, 3 Sep 2021 21:34:58 +0000 (21:34 +0000)
commit7298ee23e91b756c7009b4d7687dfd8673856f8b
treebd42bed9f3475a5071e88f0430a3a9cd2c4b2e44
parent3bee7c7f4b6bea0d5749889339c860265cba55fe
shellDBus: Use MetaContext:unsafe-mode to restrict Eval()

The Eval() method is unarguably the most sensitive D-Bus method
we expose, since it allows running arbitrary code in the compositor.

It is currently tied to the `development-tools` settings that is
enabled by default. As users have become accustomed to the built-in
commands that are enabled by the same setting (restart, lg, ...),
that default cannot easily be changed.

In order to restrict the method without affecting the rather harmless
commands, guard it by the new MetaContext:unsafe-mode property instead
of the setting.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3943

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970>
js/ui/shellDBus.js